X

Html/Css

How to get Nice & Simple Social Media Buttons

September 27, 2023

/*

Font-awesome provides nice social media buttons


*/

Font-awesome has buttons to social media icons that you can put in your website with a simple link. We're going to be using the content delivery network(cdnjs) hosted by cloudfare to get the font-awesome icons. We're going to put the link in the head of our html page. This link includes the latest version of font-awesome as well as all the icons.

The link to font-awesome cdnjs.

/*

Including the Elements in the Html


*/

We're going to be using links for facebook, linkedin & the new twitter icon. I would create a link anywhere in the body with a class of "fa-brands" & the class name of the social media icon I want.

Including the html tag for social media icons.

/*

You can style the icons with css


*/

We can also go in the css file & style the icons. You can change these properties,

background,

color,

padding,

font-size,

width,

text-align,

text-decoration,

margin.

The css for social media buttons.

You can find the project here.

About the Author

Christopher Howard

Chris is a Javascript developer with a minor in UI design. He values programming in vanilla code. Fill out the form below to contact him.